package java_class_work.week05.genericity;

/**
 * @Auther: admin
 * @Date: 2022/10/11 14:43
 * @Description:
 */

public class ObjectArr {
    private Object[] data;
    private static int len = 0;

    public ObjectArr(int length) {
        this.data = new Object[length];
    }

    public Object getData(int index) {
        return data[index];
    }

    public void addData(Object object) {
        data[len++] = object;
    }
}
